package com.dstz.sys.controller;

import com.dstz.base.api.response.impl.ResultMsg;
import com.dstz.sys.util.HttpUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
@RestController
@RequestMapping("/hrmdepartment")
public class HrmdepartmentController {
    //地址
    @Value("${fanwei.url}")
    private String url;
    //同 步 所 有 部 门 数 据
    @Value("${fanwei.AllDepartment}")
    private String AllDepartment;


    @GetMapping("")
    public ResultMsg getAllDepartment() throws IOException {
        String s= HttpUtil.sendPost(url+AllDepartment,"");
        ResultMsg resultMsg=new ResultMsg();
        resultMsg.setData(s);
        System.out.println(s);
        return resultMsg;
    }
}
